<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <button @click="getdata">按钮</button>
        <div v-show="result !=null">
            <div v-for="item in result" :key = item.id>
                <p>{{item.name}}</p>
                <img v-bind:src="item.image" style="width: 200px;"></img>
                <p>最后更改时间{{item.updatetime}}</p>
            </div>
        </div>
    </div>
    
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script type="module">
        import { createApp } from "https://unpkg.com/vue@3/dist/vue.esm-browser.js"; 
        createApp({
            data(){
                return {
                    result: null
                }
                
            },
            methods:{
                getdata(){
                    axios.get('https://mock.apifox.cn/m1/3083103-0-default/emps/list').then((result)=>{
                        console.log(result);
                        this.result = result.data.data;
                    }).catch((err)=>{
                        alert(err);
                    })
                }
            }
        }).mount("#app");
    </script>
</body>
</html>